Title: SQL W3S (By-BKK) / 005 Where
Tags: Obsidian_to_Anki

Q: What is the purpose of the WHERE clause in SQL?
A: To filter records that meet a specified condition

Q: True/False: WHERE can only be used with SELECT statements
A: False

Q: How do you select all customers from Mexico?
A: SELECT * FROM Customers WHERE Country='Mexico'

Q: What is the correct syntax for WHERE clause in SQL?
A: SELECT column1, column2 FROM table_name WHERE condition

Q: Which clause is used to update or remove specific records?
A: WHERE (used with UPDATE and DELETE)

Q: How do you compare text values in SQL?
A: Use single quotes around the text value

Q: True/False: Numeric values should be in quotes in SQL WHERE
A: False

Q: Which operator checks if values are equal in SQL WHERE?
A: Equal =

Q: How do you find customers with CustomerID greater than 80?
A: SELECT * FROM Customers WHERE CustomerID > 80

Q: What are some operators you can use in WHERE?
A: =, >, <, >=, <=, <>, BETWEEN, LIKE, IN

Q: To filter records that meet a specified condition
A: What is the purpose of the WHERE clause in SQL?

Q: SELECT * FROM Customers WHERE Country='Mexico'
A: How do you select all customers from Mexico?

Q: False
A: Is WHERE used only with SELECT statements?